//
//  UIView+CJKTCircleAngle.m
//  physicalProject
//
//  Created by Westbrook on 2018/5/23.
//  Copyright © 2018年 cjkt. All rights reserved.
//

#import "UIView+CJKTCircleAngle.h"

@implementation UIView (CJKTCircleAngle)

- (void)drawCircleAngle:(CGFloat)radius corners:(UIRectCorner)corners {
    
    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:corners cornerRadii:CGSizeMake(radius, radius)];
    
    CAShapeLayer *maskLayer = [CAShapeLayer layer];
    maskLayer.frame = self.bounds;
    maskLayer.path = maskPath.CGPath;
    
    self.layer.mask = maskLayer;
    
    
}

@end
